package com.woniuxy.rbac;

import com.woniuxy.rbac.filter.MemberFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RbacConfiguration {
    @Bean
    public FilterRegistrationBean<MemberFilter> CorsFilterRegistrationBean(){
        FilterRegistrationBean<MemberFilter> filterRegistrationBean = new FilterRegistrationBean<>();
        filterRegistrationBean.setFilter(new MemberFilter());
        filterRegistrationBean.addUrlPatterns("/ucenter/*","/order/add");
        filterRegistrationBean.setOrder(1);
        return filterRegistrationBean;
    }
}
